<extend name="./Application/Common/View/block/base.php" />
<block name="header">
    <include file="./Application/Admin/View/block/easyui_header.php" />
    <style>
        .window{
            display: block;
        }
        .form-table tr{
            height: 35px;
            line-height: 35px;;
        }
    </style>
</block>
<block name="bdoy">
    <body>

        <div id="window" class="easyui-window" title="{:LANG('export_count')}" data-options="modal:true" style="width:300px;height:200px;padding:0px;overflow: hidden;">
            <form id="form">
                <table class="form-table">
                    <tr>
                        <td width="100" align="center">起始日期：</td>
                        <td><input id="start_date" class="easyui-datetimebox textbox" required data-options="validType:'md[\'10/11/2012\']',prompt:'{:LANG('pls_slet')}{:LANG('start_date')}'"></td>
                    </tr>
                    <tr>
                        <td width="100" align="center">结束日期：</td>
                        <td><input id="end_date" class="easyui-datetimebox textbox" required data-options="validType:'md[\'10/11/2012\']',prompt:'{:LANG('pls_slet')}{:LANG('end_date')}'"></td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            <a href="javascript:export_excel()" class="easyui-linkbutton" style="width:120px">{:LANG('export')}</a>
                        </td>
                    </tr>
                </table>
            </form>
        </div>

    </body>
</block>
<block name="footExtendJs">
<script>
    var start_date;
    var end_date;

    function export_excel(){
        if(!$('#form').form('validate')){
            return;
        }
        start_date = $('#start_date').datebox('getValue');
        end_date = $('#end_date').datebox('getValue');
        var url = '/Manage/Export/export_excel?';
        console.log(start_date);
        console.log(end_date);
        window.open(url+'start_date='+start_date+'&&end_date='+end_date)
    }
</script>


</block>
